/*
 * @Author: 吴思浪
 * @Date: 2021-12-12 11:01:26
 * @LastEditors: 徐伟杰
 * @LastEditTime: 2022-10-26 11:40:19
 * @Description: 
 * @Company: 3xData
 * @youWant: add you want
 */
import {
    organizeInfo_update,
    organizeInfo_form,
    maintenance_update,
    maintenance_save,
    safety_update,
    safety_save,
    listDeviceInfo,
    getDeviceInfo,
    addDeviceInfo,
    updateDeviceInfo,
    delDeviceInfo,
    agencyInfo,
    getJournal
} from '@/api/organizeInfoChange.js'


const organizeInfoChange = {
    state: {

    },
    mutations: {
        save_area (state, data) {
            state.area = data
        },


    },
    actions: {
        organizeInfo_update ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                organizeInfo_update(obj, function (data) {
                    resolve(data)
                })
            })
        },
        organizeInfo_form ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                organizeInfo_form(obj, function (data) {
                    resolve(data)
                })
            })
        },
        safety_save ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                safety_save(obj, function (data) {
                    resolve(data)
                })
            })
        },
        safety_update ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                safety_update(obj, function (data) {
                    resolve(data)
                })
            })
        },
        maintenance_save ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                maintenance_save(obj, function (data) {
                    resolve(data)
                })
            })
        },
        maintenance_update ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                maintenance_update(obj, function (data) {
                    resolve(data)
                })
            })
        },
        listDeviceInfo ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                listDeviceInfo(obj, function (data) {
                    resolve(data)
                })
            })
        },
        getDeviceInfo ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                getDeviceInfo(obj, function (data) {
                    resolve(data)
                })
            })
        },
        addDeviceInfo ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                addDeviceInfo(obj, function (data) {
                    resolve(data)
                })
            })
        },
        updateDeviceInfo ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                updateDeviceInfo(obj, function (data) {
                    resolve(data)
                })
            })
        },
        delDeviceInfo ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                delDeviceInfo(obj, function (data) {
                    resolve(data)
                })
            })
        },
        audit_agencyInfo ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                agencyInfo(obj, function (data) {
                    resolve(data)
                })
            })
        },
        getJournalList ({ commit }, obj) {
            return new Promise((resolve, reject) => {
                getJournal(obj, function (data) {
                    resolve(data)
                })
            })
        }
    }
}

export default organizeInfoChange